Evil gear
Christmas is almost here
Goth and Gore Gifts
Shop right now or else!
Sell your soul
Believeth in me an hath everlasting life
Till death do us part
Axels New Music releases

here are some of the best and useful php scripts and snippets to help in your projects. Php displayed below. Use the search for specific script lookups. Click the category links to view scripts in Javascript and cgi. To add your own script click the link and add your useful script example.

you can delete all files by last modified date by setting time
comparison and files not to delete like the file itself

delete files based on last modified date comparison
delete-files-by-last-modified date added May 2013

<?php
//delete files in folder by time last modified
//set for 6 months 
//do
es not delete itself and admin file
$minus_wks 
time() - 4368*60*60;
// $minu
s_wks time() - 2134*60*60;
$iterator = new DirectoryIterator(dirname(__FILE__
));
foreach (
$iterator as $fileinfo) {
    if (
$fileinfo->isFile()) {
     if
 (!
strstr($fileinfo->getFilename(),\"admin.txt\") and !strstr($fileinfo->getFile
name(),\"checktime.php\")
$fileinfo->getMTime() < $minus_wks){
     unlink(
$file
info->getFilename());
    }
}
}
?>


Add your comment.













No comments yet

Search ScriptsnTips


Php JavaScripts CGI/Perl